++++++++++ SETSCREEN 3 ++++++++++



INTRODUCTION

SetScreen3 is the final version of SetScreen, a new "supplement to Balcheck"
diagnostic tool, which can help isolate a failure in a Bally/Astrocade
motherboard particularly when the motherboard powers on with a black (blank)
TV/monitor screen.

This new tool can also be used to further investigate a screen RAM error
detected by Balcheck (error code 04) by supplying the troubleshooter with "write
only" pixel emphacized graphic routines. These write only routines utilize no
screen RAM Z80 stack area and will execute even if RAM is not operating
properly.

SetScreen3 will also allow the troubleshooter to investigate a possible failure
where the Z80 CPU seems to be writing to screen RAM, but is having difficulty
reading from screen RAM.

Note

SetScreen3 should be run first on a working motherboard, so the user can become
familiar with SetScreen3's intended purposes.


SETSCREEN MAY HELP TROUBLESHOOT A BLANK SCREEN SCENARIO

Certain motherboard failures, other than a bad video output, cause the TV screen
to go blank. Does the custom data chip suddenly take a pizza break? When you
examine on-board sub#72 (Pizza Break), you find the subroutine zeroing all 8
color registers. So, all the pixels in the screen RAM area are set to the color
black and the background around the screen RAM area on the TV screen is also
black. This takes on the appearance of a blank screen. No, the custom data chip
does not take a pizza break.

The background color on the TV screen is INDEPENDENT of whether or not screen RAM,
the interface to screen RAM or the custom address chip are operating properly.
What I am saying is that at least 2 colors can still be displayed on the TV
screen as long as the Z80 CPU, ROM chip, Microcycler data bus and the custom data
chip are all operating properly. Even if there is a problem with the custom
address chip, the screen RAM interface or screen RAM, the SetScreen TV display
may still show things going on within the screen RAM area, which might help you
isolate a problem area.


POWERING UP THE MOTHERBOARD

The Nutting Manual documents the ROM power up routine beginning at address 0000H.
Before the routine begins initializing certain parameters and setting up screen
RAM for the menu, it checks address 2000H for a ROM cartridge there beginning
with the sentinel code C3 hex (a jump op code). If that sentinel code C3 is
present, then the Z80 CPU jumps to location 2000H skipping the menu set up
routine. This allows any programmer to decide how to set up the screen display.

I have an Astrocade with a user memory add-on, switchable from 6000H to 2000H.
The add-on also allows me to place an EEPROM at location 2000H. I used an EEPROM
programmed with variations of the original SetScreen routine to determine the
initialization of 3 screen parameters by the custom data chip IMMEDIATELY upon
powering on the motherboard. This is what I found out. I am assuming the custom
data chip is the chip that initializes these 3 parameters.

A. All 8 color registers, output ports 00H to 07H, are initialized to zero
   (color black).

B. The horizontal color boundary/background color, output port 09H, is
   initialized to zero. The background color is per color register 0 and the
   entire screen RAM area display is per color registers 0,1,2 and 3. The
   pixel colors are irrelevant (see C below).

C. The vertical blank register, output port 0AH, ie, the vertical blank line is
   initialized to zero, which is the very top of the screen RAM display and
   hides all the pixels.

Immediately at power on, the custom data chip blacks out (blanks) the TV screen.
Because of the initialization by the data chip described in above A, B and C,
these 3 parameters must be changed in a power up routine using the appropriate
output instructions. Note also that once these 3 parameters are set by a
program, a manual system reset will not change them.

It is typical during normal power up, to see instead of the menu, a scrambled
display of pixels with the menu colors. One must press the system reset button
to display the menu. I can only speculate as to why a scrambled display appears.
The Z80 CPU apparently begins executing the power up routine outputing the menu
colors, but then seems to wander off somewhere never getting to that part of the
power up routine that sets up the menu. Very peculiar. I have also observed that
at power up, when the menu is displayed automatically (the system reset button
is not pressed), you usually see briefly that scrambled pixel display right
before the menu appears. Is the Z80 CPU reseting itself twice?


THE SCREEN COLOR SET UP WITHIN THE ROM POWER UP ROUTINE

Let's take a look at the power up routine in ROM. When you press the system reset
button, the Z80 CPU is manually "reset" which forces the CPU to begin executing
machine language instructions at ROM address 0000H, which is where the power up
routine begins. Sometimes the Z80 CPU resets automatically when the motherboard
power on/off switch is pushed on.

The power up routine begins by executing a disable interrupts instruction,
outputs zero to port 08H telling the custom chips to operate in low resolution
and then checks for a cassette sentinel C3 hex (a jump op code) at 2000H. If the
sentinel C3 is not present, the power up routine then continues. Immediately
following the sentinel check, the Z80 CPU stack pointer is set pointing at screen
RAM. Then, the screen RAM area at 4FCE to 4FFFH is zeroed (cleared). Note that
the power up routine, shortly after clearing 4FCE-4FFFH, then turns off any
sound, sets the vertical blank register, horizontal color boundary and finally
sets the screen colors.

Now, what will happen at power up if there is some kind of problem with the
motherboard that will not allow the Z80 CPU to write to or read from screen
RAM? When the Z80 CPU begins executing the power up routine, it will eventually
come to the instructions to clear the RAM area 4FCE-4FFFH. Because of that
problem, the CPU will not be able to process that task. Why? Because clearing
that area is accomplished using the on-board sub#26. The on-board UPI processes
that call using the stack area in screen RAM to save and read data. Because of
that problem, the CPU will be unable to write or read stack data. So, the CPU
will wander off who knows where and never get around to setting any screen
colors. Thus, the TV screen will remain blacked out (blank) when powering on
the motherboard.

Whoever programmed the power up routine was more concerned with the routine's
total byte count rather than making it a little easier to troubleshoot a
motherboard. The programmer should have, immediately following the cassette
sentinel check, set the TV screen parameters including the colors, then
initialized the stack pointer, etc. However, the TV screen parameters would
have to be set with direct machine language output instructions, ie, no
subroutine calls.

This small change in the order of power up tasks would have increased the
possibility of generating some kind of visual TV display when a motherboard
failure occurs. Generally, a failed motherboard that produces some kind of TV
display is easier to diagnose compared to a failed motherboard that produces
a blank screen.

To prove my point, I programmed an EEPROM with the original SetScreen routine.
I inserted the EEPROM in my hi-res Astrocade user RAM socket, which is
switchable from 6000H to 2000H, leaving the switch at 6000H. I pulled out from
its socket, my screen RAM address A0-A5 buffer chip on my hi-res RAM board,
which is equivalent to removing chip U20 on a motherboard. When I turned on my
Astrocade, I got a blank screen. When I flipped the switch to 2000H and
pressed the system reset button, I immediately saw the TV screen split in half
in color, with a black background on the left side and a blue background on
the right side. I even saw the screen RAM area on the TV screen in color with
vertical colored stripes top to bottom.


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


EXECUTING SETSCREEN3 WITH A "HALT" REQUEST

To execute SetScreen3, hold down the S3 key and press the system reset button.
You should then see an unusual TV display. There is a drawing in the
BalcheckHR user manual doc "Miscellaneous Scans" showing and describing what
you should see with a normal initial SetScreen3 display.

Now press the CE key to "halt" SetScreen3. When you press this key,
Setscreen3 will stop scanning the keypad column 3 (left most column) and
column 1. The Z80 CPU will be placed in a Halt state and just keep executing
no ops (no operation).

When SetScreen is executed, it initializes 3 screen parameters.

1. Vertical blank (line) register to 200 (C8 hex)
2. Horizontal/Background color boundary to 20 (14 hex) for a split screen
3. the color registers defined by SetScreen's color table


In addition to the 3 parameter screen set up, SetScreen3 writes to screen
RAM as follows:

1. The top 1/3 of screen RAM (34 lines) is filled with the color 1010 1010
   (AA hex), yellow on the left and maroon on the right.

2. The center area of screen RAM is zeroed (cleared) in 17 lines with black
   on the left and blue on the right.

3. The 4 corner bytes 4000,4027,4FC8 and 4FEFH are set to color 0101 0101
   (55 hex) with the left corner bytes white and the right corner bytes
   orange.

4. You may also see scrambled pixels (saved data) in the bottom 2 lines of
   the screen RAM area. You may also see uncleared pixels or graphics below
   the center area described in above 2. This area is not changed by SetScreen3.


+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


TROUBLESHOOTING WHEN SETSCREEN3 IS "HALTED"

Run the standard Balcheck tests before you run SetScreen3. Balcheck will tell
you if the Z80 CPU and ROM are operating. Balcheck can also report if any of
the 8 video data lines are in error (code 04) or check for other errors. If
Balcheck will not even execute, the motherboard has a Zone A or B failure.
See the BalcheckHR user manual doc "Standard Balcheck Tests" for details.


RUNNING SETSCREEN ON A MOTHERBOARD DISPLAYING A BLANK SCREEN

1. Note any error report related to the TV display when you run Balcheck.

2. Try running SetScreen3 and press the key CE to halt the SetScreen
   execution.

3. If the TV screen does NOT display a split color screen with at least 2
   colors, black on the left and blue on the right, try executing SetScreen3
   again. You may not have held down the S3 key correctly while pushing down
   the system reset button. Then, press the CE key again.

4. If the split color screen still does not display, check the HALT (active
   low) pin 18 at the Z80 CPU for a logic 0 (low). The Z80 CPU HALT output
   line goes low when the CPU is in the Halt state.

   If pin 18 is at a logic 1 (high), it's an indication that SetScreen was
   not executed and halted.

   If pin 18 IS low, it's an indication that SetScreen was executed and
   halted but, there may be a problem related to the Microcycler data bus or
   custom address chip. In either case, the custom data chip is not
   processing SetScreen's execution attempt.


TROUBLESHOOTING WHEN SETSCREEN DOES NOT DISPLAY COLOR SPLIT SCREEN

When SetScreen displays the split color screen, it's an indication that the
custom data chip has received SetScreen's execution attempt and processed the
screen parameters. I am assuming the custom data chip is the custom chip that
processes the parameters because it's the chip with the video output signal.

If Balcheck executes and the SetScreen split color screen does not appear, a
motherboard failure is related to the following:

The operation of the Microcycler
The Custom Data chip

This problem area would include the circuitry/chips related to the operation
of the Microcyler data bus. So, either the custom data chip is not getting the
Z80 screen parameter output instructions because the Microcycler is failing or
the custom data chip is failing internally (chip is bad).

If you can run Balcheck, that means the Z80 CPU, ROM and Z80 address/data lines
are operating.


TROUBLESHOOTING WHEN SETSCREEN DISPLAYS COLOR SPLIT SCREEN

When you run SetScreen and at least the color split screen appears with black
on the left half and blue on the right half, the following is what SetScreen
is telling you:

1. SetScreen's three screen parameters were processed and executed.

2. The Z80 CPU and ROM chip are operating.

3. The Microcyler data bus MXD0-MXD7 is operating.
   Microcyler chips U8,U9,U10,U13 and U6 are operating.

4. The custom data chip is operating.
   The video output signal at pin 24 is operating.
   The Microcycler output signals MC0 (pin 18) and MC1 (pin 17) are operating.
   The data chip is outputing close to the 1.789 Mhz system clock signal
   (pin 16).


Besides seeing the 2 color split screen, you may see things going on WITHIN the
screen RAM area on the TV screen.

1. You may see random pixel colors or colored vertical stripes.

2. You may see pixels fading out and in. This is an indication the custom data
   chip is having difficulty receiving (scanning) data from screen RAM for the
   video output display. Remember, the Z80 is in the Halt state. It is not
   writing to or reading from screen RAM. The CPU is only sending the refresh
   address to the custom address chip.

3. You may see horizontal white speckles moving about within the screen RAM
   area only.


Additional easy checks.
Since the Z80 CPU is halted and not writing to screen RAM:

1. The DATEN (Data Enable, active low) line should be at a logic 1 (high).
   Check pin 5 at U11 for a logic 1.

2. Pin 1 at U23 should be at a logic 0 (low) enabling U23. If it is high, check
   pin 4 at U11. If this pin is also high, U11 may be bad.

3. WE (Write Enable, active low) should be at a logic 1. Check pin 6 at U12.


THE Z80 CPU HALT STATE

During a CPU Halt state, the CPU will just sit there executing internally Nops
(no operation). When the CPU halts, it does not write to or read from RAM. The
CPU will attempt to refresh RAM and the custom data chip will attempt to scan
(read) RAM for the video TV display. The custom address chip, besides attempting
to pass the Z80's refresh address, will also generate and increment the video
scan address.

The CPU will remain in the Halt state until the system reset button is pressed.
Placing the CPU in a known Halt state makes it a little easier to isolate a
problem area when troubleshooting.

During a CPU Halt state, the CPU will continue generating the M1 (Machine 1)
cycle placing the refresh address (counter) A0-A6 on the lower memory address
lines A0-A6 during the latter half of the M1 cycle. The CPU might (MCM Design
could not find info to confirm this statement) continue to place the contents of
the PC register (program counter) on the address bus during the first half of the
M1 cycle and then increment the PC register at the end of each M1 cycle. Any 
attempt by the CPU at fetching data following the Halt instruction will be
ignored by the CPU.

To exit the Halt state when SetScreen is visually confirmed executed, press the
system reset button. Reseting the system forces the Z80 CPU to begin executing
the on-board power up routine at 0000H.


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


USING SETSCREEN3 COLUMN 3 PIXEL "WRITE ONLY" ROUTINES



INTRODUCTION

A failed motherboard may have a problem related to one or more video data lines
along the Microcycler or screen RAM data buses. Balcheck can be used to
determine which of the video data lines are in error. SetScreen can help to
determine if the Microcycler data bus is operating.

SetScreen3 also offers, selectable, "write only" routines executable by
pressing a specific key in the column 3 keypad, which may be useable to further
examine a failure related to a video data line.

Four of the write routines will attempt to emphacize a specific pixel number
0,1,2 or 3. A troubleshooter, running one of these routines, may be able to
watch a particular pixel bit failing to be reset or set by the motherboard
hardware.

The fifth "write only" routine will attempt to fill the entire screen with a
specific variation of colors.

Pressing a key in column 2, while a "write only" routine is being executed, will
speed up or slow down the write speed. Six write speeds are available.

These "write only" routines do not utilize a stack area in screen RAM, so the
routines will execute even if screen RAM is not operating. Whether or not a 
TV display will actually be visible is dependant upon the particular
motherboard failure(s).


Each "write only" routine executes 4 passes changing the emphacized pixel's
color with each pass. Pass 1 will emphacize color 00 and can be thought of
as the screen clear (blank) pass. The 4 passes will repeat nonstop until the
system reset button is pressed.

The 7-segment dual display on the BalcheckHR board, during execution of these
"write only" routines will indicate which write routine "Pass" is currently
being executed.

EXECUTION OF THE COLUMN 3 PIXEL "WRITE ONLY" ROUTINES

Pressing one of 5 keys in the keypad column 3 (leftmost column) will tell
SetScreen to execute a specific "write only" routine described below.


1. THE FOUR PIXEL WRITE ROUTINES


   Four write routines are available which emphacize one particular pixel in
   every screen RAM byte.

   The pixel number designations for a byte in screen RAM is indicated below.

                 screen RAM byte
   Bit number   7 6  5 4  3 2  1 0
   Pixel number  3    2    1    0

   Pixel 0 is the least significant pixel, pixel 3 is the most significant pixel.

   It takes 2 data bits to define a pixel color. So, a pixel can be one of
   four possible colors (00, 01, 10 or 11).

   The emphacized pixel in each routine is written with the 4 color variations
   using 4 write passes.

   The 4 write passes are:
   Pass 1, pixel color 00
   Pass 2, pixel color 01
   Pass 3, pixel color 10
   Pass 4, pixel color 11

   The normal visual display on the TV screen is 40 vertical stripes
   simultaneously written top to bottom down the entire height of the screen
   RAM area.



   The following lists the column 3 key to press, to execute the "write pixel
   number" routine. As mentioned above, the pixel is written with 4 color
   variations using 4 passes. Each routine repeats the 4 passes until the
   system reset button is pushed.

   column 3     pixel number
     key       emphacized with
    press      4 color passes

      1            pixel 1

      5            pixel 3

      9            pixel 0

      D            pixel 2

   NOTE: You can see on the TV screen which pixel number is being emphacized by
         noting the position of a vertical stripe with respect to the middle
         vertical split color line. See the screen RAM byte designations above
         for the pixel number location within a byte.

 
   The following lists the expected pixel colors for each routine pass on each
   side of the split screen.

                           left side         right side

   Pass 1, pixel bits 00     black             blue

   Pass 2, pixel bits 01     white            orange

   Pass 3, pixel bits 10     yellow           maroon

   Pass 4, pixel bits 11     green             cyan


2. THE "FILL SCREEN" WRITE ROUTINE


   To repeatedly attempt to write (fill) the entire screen with 00,55,AA and FF
   hex in 4 passes, press the Q/S key in column 3. The color variations are
   identical to the above pixel write routines.


CHANGE THE WRITE SPEED OF THE COLUMN 3 WRITE ROUTINES

When a column 3 write routine is executing, you can adjust the write speed by
simply pressing a key in column 2. Six speeds are available. The top key in
column 2 provides the fastest speed.

One line of 40 bytes is written at a time. There is a time delay between each
line written to slow down or speed up the screen write providing ample time for
the user to watch the TV screen for abnormalities or incorrect pixel colors
during a specific write pass.


WRITE PASS NUMBER IS OUTPUT TO THE DUAL DISPLAY

The pass number (01, 02, 03 or 04) for each column 3 write routine is output to
the dual display which indicates which write pass is currently being executed. 
 

HOW TO EXECUTE A "WRITE ONLY" ROUTINE

To execute a column 3 "write only" routine:

Hold down the S3 key while pressing the system reset button. This action will
attempt to execute SetScreen3.

SetScreen3 will attempt to set up its initial TV display. See the BalcheckHR
user manual doc "Miscellaneous Scans". There is a drawing there showing
SetScreen3's normal initial display. If you don't see the initial display, try
again holding down the S3 key and then press the reset button. 

After the initial attempt to set up a TV display, SetScreen will execute a
tight run loop to scan the keypad columns 3 and 1.

So, after you hold down key S3 and press the system reset button, press a key
in column 3 to execute one out of the possible 5 write routines.


OBSERVING THE COLUMN 3 WRITE ROUTINES

As recommended, first run all 5 of these write routines on a working
motherboard to familiarize yourself with their execution. It is very important
that you understand what SetScreen ATTEMPTS TO DO when executing each of the 4
passes in a write routine. Without this understanding, it will be difficult to
interpret any deviation on the TV screen, during a video data line failure,
from the normal attempted write. Note the dual display indicates which pass
01,02,03 or 04 is being executed. Normally, the pass 1 write looks
like it's blanking (clearing) the TV display.

When troubleshooting a failed motherboard, first try to run the standard
Balcheck tests to see if Balcheck will execute. If Balcheck will not even
initialize with a -- (dash dash) output to the dual display, there is likely a
motherboard Zone A or B failure. See the BalcheckHR user manual doc "Standard
Balcheck Tests" describing this scenario.

Once you are able to get Balcheck running, if Balcheck reports a RAM error,
code 04, then you can try running SetScreen3. If SetScreen3 initializes with
some kind of a TV display, then you can try running a column 3 write routine
to see if you can get any visual indication that the column 3 routine is
executing.

If you don't see any visual indication on the TV screen that the column 3
write routine is executing, look at the dual display to see if it is
incrementing pass numbers. If no pass numbers are incrementing, try executing
again a column 3 write routine. A SetScreen column 3 write routine should
execute even if screen RAM is not operating, but you may only see the dual
display incrementing, which means a motherboard failure is preventing any TV
screen display from being visible. 

The column 3 write routines may be useful for further examination of a video
data line error involving 1,2 or maybe 3 bit lines. An error of say more than
3 bit lines will likely be too confusing to interpret using any of the column 3
write routines.

Start with the column 3 "Fill Screen" write routine (key Q/S) because it is
typically the easiest routine to interpret. Later, if need be, you can run one
of the four emphacized pixel write routines.

Watch the left side of the TV screen, because the colors are easier to
distinquish compared to the colors right of the TV color split line. Watch also
the dual display because it tells you which write pass is currently being
executed.

When you are able to visually see a column 3 write routine executing, make note
of what you are seeing on the left side of the TV screen. The visual indication
may confirm Balcheck's report of a particular video data line in error. Pay
attention to the color of the vertical stripes you are seeing. Compare the colors
you are seeing with the colors you SHOULD BE SEEING. For example, if a color that
you are seeing is not the correct color for that specific pass number, SetScreen
may be telling you that a particular screen RAM bit is not being reset or set.
The pixel color being displayed is either 00,01,10 or 11.

Remember, you can examine any of the 4 pixels numbers 0, 1, 2 or 3 using the 4
pixel write routines.

You can also vary the write speeds, by pressing a key in column 2, to slow down
the speed for easier observations or watch for any abnormalites present using a
fast speed.

Running the column 3 write routines may confirm the Balcheck error data report
or show things going on with the TV display that Balcheck can not show you.



TROUBLESHOOTING EXAMPLE
A MOTHERBOARD POWERS ON WITH A BLANK SCREEN

In this example, MCM Design used its motherboard #4, which has modern day
technology capacitors C6 and C1 in the power supply and a single 8KB ROM chip,
the 1978 version.

This motherboard has one socketed RAM chip U28 (data bit 4). For this example,
the chip was removed to simulate a video data line error. Even though it is
known this chip is missing, this example will go through troubleshooting steps
pretending the causing failure is not known, for the benefit of a user not
familiar with running Balcheck or Setscreen.

MCM Design prefers to power on the motherboard and the BalcheckHR board
simultaneously, because doing this tends to invoke an automatic system reset,
ie, the manual system reset button doesn't have to be pushed. So, the 2 board
power switches were pushed "on" and the power strip was used to turn on the
power.

The following documents what was observed after performing the indicated
tests.

1. Run Balcheck. When you turn on the power strip, watch the dual display, not
   the TV screen. What did you see?

   An auto reset occured.
   The dual display initialized to -- (dash dash).
   Immediately, an error sequence was displayed as 04 ][ 10 HE LP.
   The TV screen powered on black (blank).

   Comment

   If the dual display would not even initialize, then Balcheck would be
   telling you it did not execute. With this scenario, you would have to
   determine why Balcheck didn't execute, which would likely be a motherboard
   Zone A or B failure, ie, a failure related to the motherboard power supply
   or a failure related to the Z80 CPU address and data buses.

   But, in this case, an error sequence was reported. Balcheck reported an
   error code 04, indicating a video data line/RAM error. At this point,
   Balcheck would never be able to indicate if the error occurred along the
   Microcycler data bus or the screen RAM data bus.

   The error data byte 10 was indicating line bit 4 was in error.

     line bit  7 6 5 4 3 2 1 0

   error data  0 0 0 1 0 0 0 0
   1=line is
   in error

2. Run SetScreen3 by holding down key S3 while pressing the system reset button.
   If you see a TV display, then push the CE key to "Halt" SetScreen.

   Comment

   If you don't see a TV display, a failure is likely related to the
   Microcycler. If you see at least a split screen with black on the left and
   blue on the right, the color display indicates the Microcycler is operating.
   See the doc above for details.

   What did you see?

   A TV display did appear, so key CE was pressed to "Halt" SetScreen.
   The normal initial SetScreen display appeared.
   The screen RAM area below the SetScreen 17 line fill area, showed the typical
   "uncleared" RAM area.
   However, vertical stripes appeared, in the pixel 2 locations, across the
   entire width of the screen and down the entire screen RAM area. Looking at a
   screen RAM byte on each side of the vertical color split line, you could tell
   this was a pixel 2 abnormality. Each screen RAM byte can be broken down as
   shown below.

   pixel
   bit     7 6  5 4  3 2  1 0

   pixel    3    2    1    0
   number

   The color of the vertical stripes varied depending on what part of the screen
   colors it was located in.

   Comment

   So, this test was indicating a problem occuring related to bits 5 and 4
   (pixel 2) in every byte in screen RAM.

3. Investigate the pixel 2 failure some more by running SetScreen's "Fill Area"
   write routine.

   Hold down again the key S3 while pressing the system reset button. This will
   execute SetScreen again to scan columns 3 and 1. Do not press the CE key.

   Press the column3 Q/S key to execute the "Fill Screen" write routine.

   The "Fill Screen" write speed can be adjusted by pressing any key in column 2.

   A. What did you see?

      Pay attention to the pass number on the dual display.
      Note the screen colors on the left side of the split screen because they
      are easier to distinquish compared to the right side of the screen.

      Pass 1 A black area with a white vertical stripe in all pixel 2 locations
             was written.

      Pass 2 The entire area was written white down the left side.

      Pass 3 A yellow area with a green vertical stripe in all pixel 2 locations
             was written.

      Pass 4 The entire area was written green down the left side.

   B. Now mark down the bit color you SHOULD BE SEEING for the pixel 2 locations,
      for each pass. Remember, SetScreen ATTEMPTS TO write the pixels, on the
      left side of the color split line as

       Pass 1 black =  color 00
       Pass 2 white =  color 01
       Pass 3 yellow = color 10
       Pass 4 green =  color 11

       So, note what you should see, then note what you observed.

                Should See            Observed                 comment

       Pass 1  all black 00   white vertical stripes 01 least significant bit in
                                                        pixel 2 is not being reset
                                                        to zero
       PASS 2  all white 01                all white 01

       PASS 3 all yellow 10   green vertical stripes 11 least significant bit in 
                                                        pixel 2 is not being reset
                                                        to zero

       Pass 4  all green 11                all green 11

    C. Which pixel bits are utilized by pixel number 2?

       pixel bits   76 54 32 10
       pixel number 3  2  1  0

       Pixel number 2 utilizes bits 5 and 4 for every screen RAM byte.
       Bit 5 is the most significant bit. Bit 4 is the least significant bit.

    D. What is SetScreen telling you with the "Fill Screen" write routine?

       CONCLUSION: The least significant bit 4 in pixel 2 in every screen RAM
                   byte is not being reset to zero


SUMMARY OF TESTS FOR THIS EXAMPLE

1. Balcheck error code sequence was 04 ][ 10 HE LP
   Error code 04 = video data line/RAM error
   Data error byte = 10 = bit 4 error

2. Setscreen
   Initial TV display did appear showing abnormal pixel 2 vertical lines.
   "Fill Screen" write routine indicated bit 4 in pixel 2 writes is not being
    reset to zero.


DIAGNOSIS FOR THIS EXAMPLE

1. Balcheck indicated a video data line error, but can not determine if the error
   is along the Microcycler data bus or the screen RAM data bus.

2. The initial SetScreen display appeared, so the Microcycler is ok.

3. The SetScreen "Fill Screen" write routine showed no problem writing each line
   of 40 bytes, so the screen RAM address bus A0-A5,RAS,CAS and WE lines are ok.

4. The SetScreen "Fill Screen" write routine also indicated screen RAM line MD4,
   bit 4 was not being reset to zero.

Conclusion: The failure must be in the custom data chip, chip U23 or RAM chip
            U28. One of these 3 chips is not reseting line MD4, bit 4 to zero.


REPAIR COMMENTS/RECOMMENDATION FOR THIS EXAMPLE

The diagnosis is that 1 chip out of 3 possible chips is bad. You might be able
to reduce the "possibility of 3 chips" or determine which chip is bad with 
further tests using a logic analyzer or perhaps a logic probe. Included in the
BalcheckHR package are 2 troubleshooting loops. The "Write Loop" just happens
to zero the data bit 4. See the BalcheckHR user manual doc "Optional
Troubleshooting Programs" for details. SetScreen also offers column 1 write and
read routines which are detailed below. Running one of these routines while
performing further tests with a logic analyzer or logic probe might reduce the
"possibly bad" chip count. If not, don't touch the custom data chip or U23 for
now. Replace RAM chip U28 first because it's most likely the bad chip and may
be more readily available than chip U23.


FINAL COMMENTS FOR THIS EXAMPLE


Of course, we know where the failure was, since chip U28 was removed from its
motherboard socket.

The pixel 2 write routine could have been alternately used instead of the "Fill
Screen" write routine. However, the user might find the "Fill Screen" routine
easier to observe and interpret.

In this particular example, if you ran the pixel 2 write routine and noted what 
was observed during the routine execution on the left side of the screen, you
might make the following notes:

Pass 1 White pixel 2 stripes were written.

Pass 2 Saw no pixel 2 stripes being written. The pixel stripes remained white
       and the dual display did output pass 02.

Pass 3 Green pixel 2 stripes were written.

Pass 4 Saw no pixel 2 stripes being written. The pixel stripes remained green
       and the dual display did output pass 04.


Remember, the dual display indicates what pass (01,02,03 or 04) is being
executed. In this example, if the pixel 2 write routine was executed, during
the pass 2 write, it would look like nothing was happening on the TV screen.
But, in reality, the pixel 2 write routine would report the same failure as the
"Fill Screen" routine. It just would report the failure in a different way.

It takes a little time to become familiar with the application of the column 3
write routines. You first must understand what SetScreen ATTEMPTS TO WRITE for
each of the possible 5 write routines during each of their 4 passes. Once you
master that understanding, then you simply note what you are observing on the
TV screen and then focus on the observations that deviate from what you 
SHOULD BE SEEING. The hard part is interpreting your observations. Once you
gain experience interpreting observations, the failures that SetScreen reports
become easier to see.



+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


OBSERVING SETSCREEN's INITIAL DISPLAY OR COLUMN 3 WRITE ROUTINES

When using SetScreen, if the troubleshooter understands at the chip level what
is going on to produce the pixel graphics displayed on the TV screen, his/her
knowledge and observation of the TV screen peculiarities may eliminate certain
chips as "possible bad" chips.

For example, if you can see on the TV screen each horizontal line being
written, when running a column 3 write routine, you know that the custom
address chip, buffer chip U20 and the RAS, CAS and WE Lines are operating
properly.


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


USING THE COLUMN 1 WRITE AND READ ROUTINES

This column is new with 6 write and read byte routines which execute multiple
automatic write/reads for each key that is pressed. The column is intended to
help determine if the Z80 CPU is having difficulty reading screen RAM, that is,
the Z80 may be writing data to RAM correctly, but may not be reading that data
correctly. The user can watch the TV/monitor screen and dual display for write
and read attempts made by the Z80 CPU.

Column 1 provides the option of up to 6 screen RAM byte addresses (locations)
that can be written to and read from automatically. They are 4000, 4014, 4027,
4FC8, 4FDC and 4FEF, which are the 4 corner screen RAM bytes and the 2 top and
bottom lines, in the center of the each line.

When you press a key in column 1, the routine writes 00, 55, AA and FF to that
specific screen RAM location. The byte is read after it is written to. The
specific screen RAM address and each read are output to the dual display. The
routine will continue this write and read sequence nonstop until the system
reset button is pressed.

When you press a key in column 1, watch first the display to see if it is
outputing the correct RAM location and then reading the written bytes as 00,
55, AA and FF. Then, check the TV screen to see if the correct byte color is
being displayed at the specific RAM location as shown below.

Remember, you first have to place SetScreen3 in the tight run loop so it
will scan the keypad. Do that by holding down the S3 key and pressing the
system reset button. Then, press the desired key in column 1.

The top key in column 1 writes and reads location 4000H.
The bottom key in column 1 writes and reads location 4FEFH.



                             SCREEN RAM LOCATIONS

4000                                4014                                4027










4FC8                                4FDC                                4FEF




        NORMAL                           CORRECT BYTE COLOR
write           read           left side             right side  

 00              00              black                 blue
 55              55              white             light orange (looks like gray?)
 AA              AA              yellow            maroon (looks like black?)
 FF              FF              green             magenta (light blue/green)




End of document
MCM DESIGN
DEC 2018